package com.mobclick.android;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.util.Log;

class n extends Thread
{
  public void run()
  {
    SharedPreferences localSharedPreferences;
    int i;
    try
    {
      localSharedPreferences = MobclickAgent.a(this.a);
      switch (a()[this.b.ordinal()])
      {
      case 1:
      case 2:
        while (true)
        {
          while (true)
          {
            localSharedPreferences.edit().putInt("gender", i).commit();
            return;
            i = 1;
          }
          i = 2;
        }
      case 3:
        i = 0;
      }
    }
    catch (Exception localException)
    {
      while (true)
      {
        if (!(UmengConstants.testMode));
        localException.printStackTrace();
        Log.i("MobclickAgent", localException.getMessage());
      }
      i = 0;
    }
  }
}